<?php
class Ctp_Thread_Delete_Action extends NICED_Action 
{       
	public function execute() 
	{
		$controller = $this->getController();
		$request    = $controller->getRequest();			

        //load param
        $app     = $request->loadParam("app", 0, "posint");
        $sequence = $request->loadParam("sequence", 0, "posint");

		try
		{
			$model = $controller->getModel('Ctp.Index');
			$bool  = $model->deleteOneThread($app, $sequence);
		}
		catch (Exception $e)
		{
			$controller->handleException($e);
			return self::SUCCESS;
		}

		return self::SUCCESS;
	}

}//end class
